home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / mint / shells / bashsrc.zoo / readline / makefile.orig < prev    next >
Makefile  |  1991-06-02  |  4KB  |  120 lines

  1. ## -*- text -*- ####################################################
  2. #                                   #
  3. # Makefile for readline and history libraries.               #
  4. #                                   #
  5. ####################################################################
  6.  
  7. # Here is a rule for making .o files from .c files that doesn't force
  8. # the type of the machine (like -sun3) into the flags.
  9. .c.o:
  10.     $(CC) -c $(CFLAGS) $(LOCAL_INCLUDES) $(CPPFLAGS) $*.c
  11.  
  12. # Define TYPES as -DVOID_SIGHANDLER if your operating system uses
  13. # a return type of "void" for signal handlers.
  14. TYPES = -DVOID_SIGHANDLER
  15.  
  16. # Define SYSV as -DSYSV if you are using a System V operating system.
  17. #SYSV = -DSYSV
  18.  
  19. # HP-UX compilation requires the BSD library.
  20. #LOCAL_LIBS = -lBSD
  21.  
  22. # Xenix compilation requires -ldir -lx
  23. #LOCAL_LIBS = -ldir -lx
  24.  
  25. # Comment this out if you don't think that anyone will ever desire
  26. # the vi line editing mode and features.
  27. #READLINE_DEFINES = -DVI_MODE
  28.  
  29. DEBUG_FLAGS =
  30. LDFLAGS = $(DEBUG_FLAGS) 
  31. CFLAGS = $(DEBUG_FLAGS) $(TYPE) $(SYSV) -I.
  32.  
  33. # A good alternative is gcc -traditional.
  34. CC = gcc -traditional
  35. #CC = cc
  36. #RANLIB = /usr/bin/ranlib
  37. AR = ar
  38. RM = rm
  39. CP = cp
  40.  
  41. LOCAL_INCLUDES = -I.
  42.  
  43. CSOURCES = readline/readline.c readline/history.c readline/funmap.c \
  44.        readline/keymaps.c readline/vi_mode.c readline/emacs_keymap.c \
  45.        readline/vi_keymap.c readline/keymaps.c
  46.  
  47. HSOURCES = readline/readline.h readline/chardefs.h readline/history.h \
  48.     readline/keymaps.h
  49. SOURCES  = $(CSOURCES) $(HSOURCES)
  50.  
  51. #DOCUMENTATION = readline.texinfo inc-readline.texinfo \
  52. #        history.texinfo inc-history.texinfo
  53.  
  54. #SUPPORT = COPYING Makefile $(DOCUMENTATION) ChangeLog
  55.  
  56. #THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
  57.  
  58. ##########################################################################
  59.  
  60. all: libreadl.olb
  61.  
  62. libreadl.olb:    readline/readline.o readline/history.o readline/funmap.o \
  63.         readline/keymaps.o
  64.         $(RM) -f libreadl.olb
  65.         $(AR) clq libreadl.a readline/readline.o readline/history.o \
  66.             readline/funmap.o readline/keymaps.o
  67. #        -if [ -f $(RANLIB) ]; then $(RANLIB) libreadline.a; fi
  68.  
  69. readline/readline.o:    readline/readline.h readline/chardefs.h \
  70.         readline/keymaps.h readline/history.h readline/readline.c \
  71.         readline/vi_mode.c
  72.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  73.         $(LOCAL_INCLUDES) $*.c
  74.  
  75. readline/history.o:    readline/history.c readline/history.h
  76.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  77.         $(LOCAL_INCLUDES) $*.c
  78.  
  79. readline/funmap.o:    readline/readline.h
  80.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  81.         $(LOCAL_INCLUDES) $*.c
  82.  
  83. readline/keymaps.o:    readline/emacs_keymap.c readline/vi_keymap.c \
  84.         readline/keymaps.h readline/chardefs.h readline/keymaps.c
  85.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  86.          $(LOCAL_INCLUDES) $*.c
  87.  
  88. libtest.ttp:    libreadl.olb readline/libtest.c
  89.         $(CC) -o libtest.ttp $(CFLAGS) $(CPPFLAGS) -L. \
  90.             readline/libtest.c -lreadline -ltermcap
  91.  
  92. readline.ttp: readline/readline.c readline/history.o readline/keymaps.o \
  93.         readline/funmap.o readline/readline.h readline/chardefs.h
  94.     $(CC) $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  95.         $(LOCAL_INCLUDES) -DTEST -o readline.ttp \
  96.         readline/readline.c readline/funmap.o \
  97.         readline/keymaps.o readline/history.o -L. -ltermcap
  98.  
  99. #readline.tar:    $(THINGS_TO_TAR)
  100. #        tar -cf readline.tar $(THINGS_TO_TAR)
  101.  
  102. #readline.tar.Z:    readline.tar
  103. #        compress -f readline.tar
  104.  
  105. #install:    $(DESTDIR)/libreadline.a includes
  106.  
  107. #includes:
  108. #        if [ ! -r $(INCDIR)/readline ]; then\
  109. #         mkdir $(INCDIR)/readline;\
  110. #         chmod a+r $(INCDIR)/readline;\
  111. #        fi
  112. #        $(CP) readline.h keymaps.h chardefs.h $(INCDIR)/readline/
  113. clean:
  114.         rm -f *.o *.a *.log *.cp *.tp *.vr *.fn *.aux *.pg *.toc
  115.  
  116. #$(DESTDIR)/libreadline.a: libreadline.a
  117. #        -mv $(DESTDIR)/libreadline.a $(DESTDIR)/libreadline.old
  118. #        cp libreadline.a $(DESTDIR)/libreadline.a
  119. #        $(RANLIB) -t $(DESTDIR)/libreadline.a
  120.